import request from '@/utils/request'
//type 只导出类型不会导出具体的值
import type { loginForm, loginResponseForm, userResponseForm } from './type'
enum API {
  LOGIN_URL = '/user/login',
  USER_INFO = '/user/info',
}
//对外暴露
export const login = (data: loginForm) => request.post<any, loginResponseForm>(API.LOGIN_URL, data)

export const info = () => request.post<userResponseForm>(API.USER_INFO)
